# -*- coding: utf-8 -*-
from PyQt4.QtCore import *
from player import Player

class Human(Player):
    def __init__(self, table):
        Player.__init__(self, table)
        QObject.__init__(self, table)

        for row in self.table.fields:
            for field in row:
                self.connect(field , SIGNAL('clicked'), self._selectField)

    def _selectField(self, x, y):
        if self.active:
            self.table.pick(x, y)
